package com.zheng.oss.rpc.api;

import com.alibaba.fastjson.JSONObject;
import com.zheng.oss.dao.model.OssFile;
import com.zheng.common.base.BaseService;
import com.zheng.oss.dao.model.OssRoleFile;
import com.zheng.oss.dto.FolderDto;
import com.zheng.oss.dto.ShareFileDto;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author likun
 * @since 2018-05-08
 */
public interface OssFileService extends BaseService<OssFile> {
    OssFile insertFile(OssFile file);

    List<Map<String, Object>> selectFilePage(OssFile file);

    Integer selectFilePageCount(OssFile file);

    boolean deleteFile(String ids, String username, Boolean isSystem) throws Exception;

    boolean createFolder(FolderDto folder, String username) throws Exception;

    boolean insertShare(List<Integer> userIdList, List<Integer> fileIdList);

    List<Map<String, Object>> selectShareFilePage(ShareFileDto shareFileDto);

    Integer selectShareFilePageCount(ShareFileDto shareFileDto);

    boolean updateSystemFile(OssFile file, String username) throws Exception;

    List<OssFile> selectFileTree(OssFile file);

}
